Skip to content

Commit d1564dd

Browse files
committed
improve diagnostics
1 parent fbdddaf commit d1564dd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/mongo/socket/tcp.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ class TCP < Socket
4646
# @since 2.0.0
4747
# @api private
4848
def initialize(host, port, timeout, family, options = {})
49+
if family.nil?
50+
raise ArgumentError, 'family must be specified'
51+
end
4952
super(timeout, options)
5053
@host, @port = host, port
5154
@family = family

0 commit comments

Comments
 (0)