# Documentation The [documentation](https://docs.python.org/3/library/socket.html#socket.socket.getblocking) for `socket.getblocking()` states: > This is equivalent to checking socket.gettimeout() == 0. But that's the opposite of what it means. According to the [source code](https://github.com/python/cpython/blob/main/Modules/socketmodule.c), `getblocking()` returns `False` if and only if `gettimeout()` returns `0.0.` <!-- gh-linked-prs --> ### Linked PRs * gh-105026 * gh-105283 * gh-105284 <!-- /gh-linked-prs -->
Documentation
The documentation for
socket.getblocking()states:But that's the opposite of what it means. According to the source code,
getblocking()returnsFalseif and only ifgettimeout()returns0.0.Linked PRs
socket.getblocking()andsocket.gettimeout()#105026socket.getblocking()andsocket.gettimeout()(GH-105026) #105283socket.getblocking()andsocket.gettimeout()(GH-105026) #105284