Skip to content

Commit c6af108

Browse files
committed
Float type for default socket timeout
Signed-off-by: Matthew Kim <[email protected]>
1 parent 878d1f2 commit c6af108

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/databricks/sql/thrift_backend.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def __init__(
154154

155155
timeout = 60 if kwargs.get("_socket_timeout") is None else kwargs.get("_socket_timeout")
156156
# setTimeout defaults to 60 seconds and is expected in ms
157-
self._transport.setTimeout(float(timeout) * 1000.0)
157+
self._transport.setTimeout(timeout and (float(timeout) * 1000.0))
158158

159159
self._transport.setCustomHeaders(dict(http_headers))
160160
protocol = thrift.protocol.TBinaryProtocol.TBinaryProtocol(self._transport)

0 commit comments

Comments
 (0)