| 8069 | } |
| 8070 | if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { |
| 8071 | throw new InvalidArgumentError("maxResponseSize must be a positive number"); |
| 8072 | } |
| 8073 | if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) { |
| 8074 | throw new InvalidArgumentError("autoSelectFamilyAttemptTimeout must be a positive number"); |
| 8075 | } |
| 8076 | if (allowH2 != null && typeof allowH2 !== "boolean") { |
| 8077 | throw new InvalidArgumentError("allowH2 must be a valid boolean value"); |
| 8078 | } |
| 8079 | if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) { |
| 8080 | throw new InvalidArgumentError("maxConcurrentStreams must be a positive integer, greater than 0"); |