[issue28825] socket.SO_KEEPALIVE does not work on FreeBSD

2016-11-28 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Python just passes socket options to the operating system, so whatever behavior 
you're seeing is likely part of the OS.

--
nosy: +benjamin.peterson
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28825] socket.SO_KEEPALIVE does not work on FreeBSD

2016-11-28 Thread Victor Porton

Victor Porton added the comment:

Weird, after I minimized the PHP example, it also has the same bug as the 
Python one. (The real long code in PHP was working without this bug.)

I attach the PHP code for your reference.

Maybe it is a FreeBSD bug?

Please write to por...@narod.ru with advice how to make the server not to 
disconnect after 5 minutes of idle connection.

--
Added file: http://bugs.python.org/file45678/bug.php

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28825] socket.SO_KEEPALIVE does not work on FreeBSD

2016-11-28 Thread Victor Porton

New submission from Victor Porton:

When I connect

telnet XXX 9000

to the server in attached file, the connection breaks after 5 min (and a few 
seconds), as if SO_KEEPALIVE were not specified.

I run my server on
FreeBSD 9.2-RELEASE-p15 (GENERIC)

So SO_KEEPALIVE does not work in Python 2.7 and 3.5 on FreeBSD.

Specifically, I need my TCP connection not to break in extended periods of time 
and cannot do this with Python.

It seems that similar code does work with PHP (I am going to write a short PHP 
example), so it is likely a Python bug, not FreeBSD bug.

--
components: FreeBSD, IO, Library (Lib)
files: bug.py
messages: 281911
nosy: koobs, porton
priority: normal
severity: normal
status: open
title: socket.SO_KEEPALIVE does not work on FreeBSD
type: behavior
versions: Python 2.7, Python 3.5
Added file: http://bugs.python.org/file45677/bug.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com